#ifndef HTTPD_LOGGER_HPP
#define HTTPD_LOGGER_HPP



typedef enum log_level_t
{
    LOG_LVL_ERROR = 1,
    LOG_LVL_WARNING,
	LOG_LVL_INFO,
    LOG_LVL_DETAILS
}log_level_t;

typedef enum log_group_t
{
	 LOG_GRP_ALL = 1,
     LOG_GRP_HTTPD,
     LOG_GRP_TCP
}log_group_t;

#define LOG_LVL_DEFAULT LOG_LVL_DETAILS

extern enum log_group_t _log_group;
extern enum log_level_t _log_level;

struct log_entry
{
	enum log_group_t _grp;
	enum log_level_t _lvl;
	std::string _time;
	std::string _log;

};

struct configuration;
typedef configuration configuration_t;

bool logger_start(std::string fname);
void logger_stop();
void logger_log(enum log_group_t group, enum log_level_t level, std::string log);
void logger_log(enum log_group_t group, enum log_level_t level, const char *log, int len);

#endif // HTTPD_LOGGER_HPP
